package com.yycx.module.bus.provider.handler.haiying.tasktodo.settle;

import com.yycx.common.base.entity.EntityMap;
import com.yycx.common.mybatis.interceptor.PageInterceptor;
import com.yycx.common.mybatis.model.PageParams;
import com.yycx.common.mybatis.query.CriteriaQuery;
import com.yycx.module.bus.client.entity.hy.BusHyorderInovice;
import org.springframework.stereotype.Component;

/**
 * 开票申请发票列表
 *
 * @author zyf
 */
@Component
public class HyInvoiceFpPageListHandler implements PageInterceptor<BusHyorderInovice> {


    @Override
    public void prepare(CriteriaQuery<BusHyorderInovice> cq, PageParams pageParams, EntityMap params) {
        //开票ID
        String settleInvoiceId = params.get("settleInvoiceId");
        cq.select(BusHyorderInovice.class, "*");
        cq.eq(true, "bhi.settleInvoiceId", settleInvoiceId);
        cq.orderByDesc("bhi.createTime");
    }


}
